<?php
class User extends AppModel
{
	var $name = 'User';
	var $actsAs = array('Containable');

	/*var $hasMany = array(	'To'=>array('classname'=>'Message', 'foreignkey'=>'to_id'),
				'From'=>array('classname'=>'Message', 'foreignkey'=>'from_id'));*/

	var $belongsTo = array(
							//'Units' 	=> array('classname'  => 'Units'),
							'Group'		=> array('classname' => 'Group'),
							'Cidade' => array('classname'  => 'Cidade'));
	var $hasOne = array(
							'Employee' => array(
									'classname' => 'Employee'
							),
		                    'Volunteer'  => array(
		                    		'classname' => 'Volunteer'
							));

	var $hasAndBelongsToMany = array('Unit' =>
									array(	'className' => 'Unit',
											'joinTable' => 'units_users'));

	/*var $hasMany = array(
			'Message' =>
				array('className'  => 'Message')

	);*/

	var $hasMany = array(
				/*'Message'=>array('classname'=>'Message', 'foreignkey'=>'to_id'),
				'Message'=>array('classname'=>'Message', 'foreignkey'=>'from_id'),*/
				'Noticia'=>array('classname'=>'Noticia'));


	var $recursive = 1;
}
